

threaten_nuclear_war = {
	is_shown = {
		has_journal_entry = je_Mod_Nuclear_Atomic_Weapon_Tracker
	}
	
	possible = {
		NOT = {
			has_variable = nuclear_strike_cooldown
		}
		var:warhead_current_stockpile >= 1
		var:strike_capacity_current_stockpile >= 1
		is_ai = no
		OR = {
			# always = yes  ## Debug Use
			has_variable = recent_nuclear_strike

			AND = {
				any_scope_war = {
					has_war_support = { 
						target = ROOT
						value <= -50
					}
				}
				is_at_war = yes
				OR = {
					any_scope_state = {
						is_capital = yes
						devastation > 0.5
					}
					any_scope_state = {
						OR = {
							is_incorporated = yes
							is_homeland_of_country_cultures = ROOT
						}
						devastation > 0.80
					}
				}
			}
			AND = {
				any_diplomatic_play = {
					target_is = ROOT
					escalation > 40
				}
				is_ai = no
			}
			AND = {
				is_ai = no
				is_at_war = yes
			}
		}
	}

	when_taken = {
		trigger_event = mod_nuclear_strategic_strike.100
		set_variable = {
			name = nuclear_strike_cooldown
			days = 3
		}
	}

	ai_chance = {
		base = 0
	}

}